﻿-- =============================================
-- 新闻类型表添加及修改
-- =============================================
create procedure proc_Editpm_newTypes
  @Id decimal(18,0),
  @title nvarchar(200),
  @newRemark nvarchar(500)
as 
  if (@Id is null)
	  begin
	  insert into pm_newTypes (Title,NewTime,NewRemark)values(@title,GETDATE(),@newRemark)
	  end
  else
	  begin
		  if exists(select Id from pm_newTypes as ntp where ntp.Id=@Id)
		  begin
			update pm_newTypes set Title=@title,NewRemark=@newRemark where Id=@Id
		  end
	  end